{extend name="$_admin_layout"}

{block name="tpl_vars"}
    {assign name="page_title" value="首页" /}
{/block}

{block name="full-content"}
    <section class="content">
        <div class="row">
            <div class="col-md-3 col-sm-6 col-xs-12">
                <div class="info-box">
                    <span class="info-box-icon bg-aqua">
                        <i class="fa fa-th-large"></i>
                    </span>
                    <div class="info-box-content">
                        <span class="info-box-text">模块总数</span>
                        <span class="info-box-number">{$index_count['module']}</span>
                    </div>
                </div>
            </div>
            <div class="col-md-3 col-sm-6 col-xs-12">
                <div class="info-box">
                    <span class="info-box-icon bg-red">
                        <i class="fa fa-users"></i>
                    </span>
                    <div class="info-box-content">
                        <span class="info-box-text">用户总数</span>
                        <span class="info-box-number">{$index_count['users']}</span>
                    </div>
                </div>
            </div>
            <div class="col-md-3 col-sm-6 col-xs-12">
                <div class="info-box">
                    <span class="info-box-icon bg-green">
                        <i class="fa fa-user"></i>
                    </span>
                    <div class="info-box-content">
                        <span class="info-box-text">今日新增</span>
                        <span class="info-box-number">{$index_count['today']}</span>
                    </div>
                </div>
            </div>
            <div class="col-md-3 col-sm-6 col-xs-12">
                <div class="info-box">
                    <span class="info-box-icon bg-yellow">
                        <i class="fa fa-line-chart"></i>
                    </span>
                    <div class="info-box-content">
                        <span class="info-box-text">在线用户(3min内)</span>
                        <span class="info-box-number">{$index_count['online']}</span>
                    </div>
                </div>
            </div>
        </div>

        <div class="row">
            <div class="col-md-6">
                <div class="box box-green">
                    <div class="box-header">
                        <h3 class="box-title"><i class="fa fa-cog"></i> 系统信息</h3>
                    </div>
                    <div class="box-body" style="height: 270px;">
                        <table class="table table-condensed no-margin">
                            <tbody>
                                <tr>
                                    <td>产品名称</td>
                                    <td>{$Think.const.SF_PRODUCT_NAME}</td>
                                </tr>
                                <tr>
                                    <td>产品版本</td>
                                    <td>{$Think.const.SF_PRODUCT_VERSION}</td>
                                </tr>
                                <tr>
                                    <td>核心框架</td>
                                    <td>{$Think.VERSION}</td>
                                </tr>
                                <tr>
                                    <td>服务器操作系统</td>
                                    <td>{$Think.const.PHP_OS}</td>
                                </tr>
                                <tr>
                                    <td>运行环境</td>
                                    <td>
                                        <?php
                                            $server_software = explode(' ', $_SERVER['SERVER_SOFTWARE']);
                                                echo $server_software[0];
                                            ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td>PHP版本</td>
                                    <td><?php echo PHP_VERSION; ?></td>
                                </tr>
                                <tr>
                                    <td>MYSQL版本</td>
                                    <td>
                                        <?php
                                            $system_info_mysql = \think\Db::query("select version() as v;");
                                                echo $system_info_mysql[0]['v'];
                                            ?>
                                    </td>
                                </tr>
                                <tr>
                                    <td>上传限制</td>
                                    <td>{:ini_get('upload_max_filesize')}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>

            <div class="col-md-6">
                <div class="box box-yellow with-border">
                    <div class="box-header">
                        <h3 class="box-title"><i class="fa fa-users"></i> 产品团队</h3>
                    </div>
                    <div class="box-body" style="height: 270px;">
                        <table class="table table-condensed no-margin">
                            <tbody>
                                <tr>
                                    <td>公司名称</td>
                                    <td>{$Think.const.SF_COMPANY_NAME}</td>
                                </tr>
                                <tr>
                                    <td>开发团队</td>
                                    <td>{$Think.const.SF_TEAM_MEMBER}</td>
                                </tr>
                                <tr>
                                    <td>公司地址</td>
                                    <td>{$Think.const.SF_COMPANY_ADDRESS}</td>
                                </tr>
                                <tr>
                                    <td>官方网址</td>
                                    <td><a href="{$Think.const.SF_COMPANY_URL}" target="_blank">{$Think.const.SF_COMPANY_URL}</a></td>
                                </tr>
                                <tr>
                                    <td>客服QQ</td>
                                    <td>{$Think.const.SF_COMPANY_QQ}</td>
                                </tr>
                                <tr>
                                    <td>电子邮件</td>
                                    <td>{$Think.const.SF_COMPANY_EMAIL}</td>
                                </tr>
                                <tr>
                                    <td>联系电话</td>
                                    <td>{$Think.const.SF_COMPANY_PHONE}</td>
                                </tr>
                            </tbody>
                        </table>
                   </div>
               </div>
            </div>
        </div>
    </section>
{/block}
